<template>
  <div class="new-employee">
    <van-nav-bar
      title="新员工专属"
      placeholder
      fixed
      left-arrow
      @click-left="back"
    />
    <div class="new-employee__content">
      <div class="img-card" v-for="i in 19" :key="i" @click="toDetail">
        <img src="@/assets/images/login.png" />
        <div class="img-card__right">
          <div class="img-card__title">
            <span class="title">历经中外合资企业、国营股份企 </span>
          </div>
          <div class="img-card__center">
            <div>
              <span>50</span>
              金币
            </div>
            <div>
              <span>20</span>
              学分
            </div>
          </div>
          <div class="img-card__footer">
            <div class="img-card__learn">已学习<span>75%</span></div>
            <div class="img-card__btn">去学习</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script name="NewEmployee" setup>
import { useRouter } from "vue-router";
const router = useRouter();
const back = () => {
  window.history.back();
};
const toDetail = () => {
  router.push({
    path: "/task-detail",
  });
};
</script>
<style lang="scss" scoped>
.new-employee {
  &__content {
    padding: 12px 16px;

    .img-card {
      background-color: #fff;
      padding: 14px 16px;
      display: flex;
      border-radius: 4px;
      margin-bottom: 12px;
      img {
        width: 110px;
        height: 90px;
        border-radius: 4px;
      }
      &__right {
        flex: 1;
        padding-left: 10px;
      }
      &__title {
        .tag {
          float: left;
          text-align: center;
          line-height: 18px;
          margin-right: 10px;
          width: 32px;
          height: 18px;
          background: #d2e8ff;
          border-radius: 2px;
          font-size: 12px;
          font-family: PingFangSC, PingFang SC;
          font-weight: 400;
          color: #349aff;
        }
        .title {
          font-size: 16px;
          font-family: PingFangSC, PingFang SC;
          font-weight: 500;
          color: #272b2d;
          line-height: 22px;
        }
      }
      &__center {
        padding: 4px 0;
        display: flex;
        align-items: center;
        font-size: 12px;
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        color: #676b6b;
        div {
          margin-right: 6px;
        }
        span {
          font-size: 12px;
          font-family: PingFangSC, PingFang SC;
          font-weight: 400;
          color: #ffac24;
        }
      }
      &__footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
      }
      &__learn {
        font-size: 12px;
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        color: #676b6b;
        span {
          font-size: 12px;
          font-family: PingFangSC, PingFang SC;
          font-weight: 400;
          color: #ffac24;
          padding-left: 4px;
        }
      }
      &__btn {
        width: 60px;
        height: 20px;
        border-radius: 16px;
        border: 1px solid #00c37d;
        font-size: 12px;
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        color: #00ad6f;
        display: flex;
        align-items: center;
        justify-content: center;
      }
    }
  }
}
</style>
